<template>
<div class="administer">
    <div class="administerNav">
        <backHeader></backHeader>
    </div>
    <div class="administerCont">          
        <div class="html_pst">
            <!--散点 -->
            <div class="cassBack_three" v-show="currentTab == 3">
                <echatPointYsd736  v-if="currentDetailInfo.contestTypeId == 736" ref="echat_point_ysd" :colorFlag="colorFlag" :contestId="contestId" :contestTypeStr="currentDetailInfo.contestTypeStr" @backDetail="backDetail"></echatPointYsd736>
                <echatPointBkg465  v-else-if="currentDetailInfo.contestTypeId == 465" ref="echat_point_bkg" :colorFlag="colorFlag" :contestId="contestId" :contestTypeStr="currentDetailInfo.contestTypeStr" @backDetail="backDetail"></echatPointBkg465>
                <echatPointKg359  v-else-if="currentDetailInfo.contestTypeId == 359" ref="echat_point_kg" :colorFlag="colorFlag" :contestId="contestId" :contestTypeStr="currentDetailInfo.contestTypeStr" @backDetail="backDetail"></echatPointKg359>
                <echatPointOther v-else ref="echat_point_other" :colorFlag="colorFlag" :contestId="contestId" :contestTypeStr="currentDetailInfo.contestTypeStr" @backDetail="backDetail"></echatPointOther>
            </div>
            <!--四维散点 -->
            <div class="cassBack_three" v-show="currentTab == 4">
                <echatFourYsd736  v-if="currentDetailInfo.contestTypeId == 736" ref="echat_four_ysd" :colorFlag="colorFlag" :contestId="contestId" :contestTypeStr="currentDetailInfo.contestTypeStr" @backDetail="backDetail"></echatFourYsd736>
                <echatFourBkg465 v-else-if="currentDetailInfo.contestTypeId == 465" ref="echat_four_bkg" :colorFlag="colorFlag" :contestId="contestId" :contestTypeStr="currentDetailInfo.contestTypeStr" @backDetail="backDetail"></echatFourBkg465>
                <echatFourKg359  v-else-if="currentDetailInfo.contestTypeId == 359" ref="echat_four_kg" :colorFlag="colorFlag" :contestId="contestId" :contestTypeStr="currentDetailInfo.contestTypeStr" @backDetail="backDetail"></echatFourKg359>
                <echatFourOther v-else ref="echat_four_other" :colorFlag="colorFlag" :contestId="contestId" :contestTypeStr="currentDetailInfo.contestTypeStr" @backDetail="backDetail"></echatFourOther>
            </div>
            <div class="cassBack"  v-show="currentTab == 1" >
                <el-form :inline="true" class="demo-form-inline application">
                    <el-form-item label="应用类型" class="witd">
                            <el-select v-model="request.contestTypeId" style="width:135px">
                                <el-option label="全部" value=""></el-option>
                                <el-option v-for="item in typeList" :label="item.dictCont" :value="item.id" :key="item.id"></el-option>
                            </el-select>
                    </el-form-item>
                        
                        <template v-if="request.contestTypeId==356 || request.contestTypeId==358 || request.contestTypeId==498 || request.contestTypeId==362">
                            <el-form-item label="H" class="power">
                                <el-input v-model="request.h" style="width:76px"></el-input>
                            </el-form-item>
                            <el-form-item label="W" class="power">
                                <el-input v-model="request.w" style="width:76px"></el-input>
                            </el-form-item>
                            <el-form-item label="D" class="power">
                                <el-input v-model="request.lumSizeMin" style="width:76px"></el-input> ~ 
                                <el-input v-model="request.lumSizeMax" style="width:76px"></el-input>
                            </el-form-item>
                        </template>
                        <!--357 正投 -->
                        <template v-if="request.contestTypeId==357">
                            <el-form-item label="W" class="power">
                                <el-input v-model="request.w" style="width:76px"></el-input>
                            </el-form-item>
                            <el-form-item label="W1" class="power">
                                <el-input v-model="request.w1" style="width:76px"></el-input>
                            </el-form-item>
                            <el-form-item label="D" class="power">
                                <el-input v-model="request.lumSize" style="width:76px"></el-input>
                            </el-form-item>
                        </template>
                        <!--360 复合面 -->
                        <template v-if="request.contestTypeId==360">
                            <el-form-item label="H" class="power">
                                <el-input v-model="request.h" style="width:76px"></el-input>
                            </el-form-item>
                            <el-form-item label="W" class="power">
                                <el-input v-model="request.w" style="width:76px"></el-input>
                            </el-form-item>
                            <el-form-item label="W1" class="power">
                                <el-input v-model="request.w1" style="width:76px"></el-input>
                            </el-form-item>
                            <el-form-item label="W2" class="power">
                                <el-input v-model="request.w2" style="width:76px"></el-input>
                            </el-form-item>

                            <el-form-item label="D" class="power">
                                <el-input v-model="request.lumSizeMin" style="width:76px"></el-input> ~ 
                                <el-input v-model="request.lumSizeMax" style="width:76px"></el-input>
                            </el-form-item>
                        </template>
                        <!-- 361 单侧导光 805 双侧道光 806光电玻璃 466自发光线-->
                        <!-- <template v-if="request.contestTypeId==361 || request.contestTypeId==805  || request.contestTypeId==806 || request.contestTypeId==466 ">
                            <el-form-item label="H" class="power">
                                <el-input v-model="request.h"></el-input>
                            </el-form-item>
                            <el-form-item label="W" class="power">
                                <el-input v-model="request.w" style="width:100px"></el-input>
                            </el-form-item>
                        </template> -->
                        <el-form-item label="检测类型" class="witd">
                            <el-select v-model="request.dataType" style="width:135px">
                                <el-option label="全部" value=""></el-option>
                                <el-option label="典型检测" value="1"></el-option>
                                <el-option label="项目检测" value="2"></el-option>                            
                            </el-select>
                        </el-form-item>
                        <el-form-item>
                            <el-button type="primary" @click="search(1)">查询</el-button>
                        </el-form-item>
                </el-form>
                <div class="roleControl applicationTable">
                <el-table
                    :data="tableData"
                    border
                    v-loading="loading" element-loading-text="加载中..." 
                    :max-height="tableHeight"
                    style="width: 100%">
                    <el-table-column type="index" label="序号" width="50"> </el-table-column>
                    <el-table-column prop="contestTypeStr" label="应用面类型"></el-table-column>  
                    <!-- <el-table-column prop="contestCode" label="应用场景编号"></el-table-column>   -->
                    
                        <el-table-column v-if="currentTypeId == '' || currentTypeId == 356 || currentTypeId == 358 || currentTypeId == 498 || currentTypeId == 362 || currentTypeId == 360 || currentTypeId == 805  || currentTypeId==806 || currentTypeId==466 " prop="h" label="H(m)">
                            <template scope="scope">
                                {{scope.row.h}}
                            </template>
                        </el-table-column>  
                        <el-table-column v-if="currentTypeId == '' || currentTypeId == 356 || currentTypeId == 358 || currentTypeId == 498 || currentTypeId == 362 || currentTypeId == 357 || currentTypeId == 360 || currentTypeId == 805  || currentTypeId==806 || currentTypeId==466 " prop="w" label="W(m)">
                            <template scope="scope">
                                {{scope.row.w}}
                            </template>
                        </el-table-column>  
                        <el-table-column v-if="currentTypeId == '' || currentTypeId == 356 || currentTypeId == 358 || currentTypeId == 498 || currentTypeId == 362 || currentTypeId == 357" prop="d" label="D(m)">
                            <template slot-scope="scope">
                                <span v-show="scope.row.d != null"><span v-show="scope.row.db != null">{{scope.row.db}} ~ </span>{{scope.row.d}}</span>
                            </template>
                        </el-table-column>  
                        <el-table-column v-if="currentTypeId == '' || currentTypeId == 357 || currentTypeId == 360" prop="w1" label="W1(m)">
                            <template scope="scope">
                                {{scope.row.w1}}
                            </template>
                        </el-table-column>  
                        <el-table-column v-if="currentTypeId == '' || currentTypeId == 360" prop="w2" label="W2(m)">
                            <template scope="scope">
                                {{scope.row.w2}}
                            </template>
                        </el-table-column>

                    <el-table-column label="单白/条">
                        <template scope="scope">
                            <span class="bg" @click="handleShowDetail(scope.row,1)">{{scope.row.contestCount}}</span>
                        </template>
                    </el-table-column>  
                    <el-table-column label="彩色/条">
                        <template scope="scope">
                            <span class="bg" @click="handleShowDetail(scope.row,2)">{{scope.row.colourCount}}</span>
                        </template>
                    </el-table-column>  
                </el-table>
                <div style="padding:10px;text-align:center">
                        <el-pagination
                            @size-change="handleSizeChange"
                            @current-change="handleCurrentChange"
                            :current-page="request.page"
                            :page-sizes="[20, 50, 100, 200]"
                            :page-size="request.rows"
                            layout="total, sizes, prev, pager, next, jumper"
                            :total="totalCount">
                        </el-pagination>
                    </div>
                </div>
            </div>
            <div class="cassBack_two"  v-show="currentTab == 2">
                 
                <el-form :inline="true" class="demo-form-inline">
                    <div class="top">
                        <span class="backuy" @click="backList()"><i class="el-icon-back"></i></span>
                    </div>
                    <el-form-item label="应用类型:">
                        <span>{{currentDetailInfo.contestTypeStr}}</span>
                    </el-form-item>
                    <el-form-item label="应用面信息:">
                        <span v-show="currentDetailInfo.h">H:{{currentDetailInfo.h}}  &nbsp; </span>
                        <span v-show="currentDetailInfo.w">W:{{currentDetailInfo.w}} &nbsp; </span>
                        <span v-show="currentDetailInfo.d">D:{{currentDetailInfo.db}} ~ {{currentDetailInfo.d}} &nbsp; </span>
                        <span v-show="currentDetailInfo.w1">W1:{{currentDetailInfo.w1}} &nbsp; </span>
                        <span v-show="currentDetailInfo.w2">W2:{{currentDetailInfo.w2}} &nbsp; </span>
                    </el-form-item>
                    <el-form-item>
                        <span>{{colorFlag == 1 ? '单白' : '彩色'}}</span>
                    </el-form-item>
                    
                    <el-form-item label="灯具品牌:" class="wid150">
                        <el-select v-model="chooseBrandIdList" multiple collapse-tags >
                            <el-option v-for="item in lampBrandList" :key="item.id" :label="item.brandName" :value="item.id"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="检测类型" class="witd wid150">
                            <el-select v-model="innerRequest.dataTypeStr">
                                <el-option label="全部" value=""></el-option>
                                <el-option label="典型检测" value="1"></el-option>
                                <el-option label="项目检测" value="2"></el-option>                            
                            </el-select>
                        </el-form-item>
                    <el-form-item label="数据:" v-show="currentDetailInfo.contestTypeId == 360 || currentDetailInfo.contestTypeId == 362">
                        <el-select v-model="innerRequest.surfaceType">
                            <el-option label="A面数据" value="A"></el-option>
                            <el-option label="B面数据" value="B"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item>
                        <el-button @click="searchInner(1)" type="primary">查询</el-button>
                    </el-form-item>
                    <div class="top">
                        
                        <button type="button" @click="showEchat1()">散点图表</button>
                        <button type="button" @click="showEchat2()">四维散点图表</button>
                    </div>
                </el-form>
                
                <div class="">
                 <el-table ref="multipleTable" :data="InnerDataTable" tooltip-effect="dark" class="tabge" style="width: 100%" :max-height="tableHeight1"  @selection-change="handleSelectionChange">
                    <el-table-column :selectable="checkSelectable" type="selection" width="55"></el-table-column>
                    <el-table-column prop="posCode" label="名称"></el-table-column>
                    <el-table-column  label="样品型号">
                        <template slot-scope="scope">
                            <span class="">{{ scope.row.lumModel }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column  label="功率">
                            <template slot-scope="scope">
                                <span v-show="scope.row.power != null">{{ scope.row.power }}W</span>
                            </template>
                        </el-table-column>
                        <template v-if="currentDetailInfo.contestTypeId == 359 || currentDetailInfo.contestTypeId == 465 || currentDetailInfo.contestTypeId==736">
                                <template v-if="currentDetailInfo.contestTypeId== 359">
                                    <el-table-column  prop="lightIntensity1" label="0°">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity1 > 0">{{scope.row.lightIntensity1}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column sortable prop="lightIntensity6" label="上30°" width="110">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity6 >0">{{scope.row.lightIntensity6}}cd</span>
                                        <span v-if="scope.row.lightIntensity6Max >0"> ~ {{scope.row.lightIntensity6Max}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column sortable prop="lightIntensity4" label="下60°" width="110">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity4 > 0">{{scope.row.lightIntensity4}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column sortable prop="lightIntensity5" label="左60°" width="110">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity5 > 0">{{scope.row.lightIntensity5}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column  sortable prop="lightIntensity2" label="右60°" width="110">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity2 > 0">{{scope.row.lightIntensity2}}cd</span>
                                        </template>
                                    </el-table-column>
                                </template>
                                <template v-else-if="currentDetailInfo.contestTypeId == 465">
                                    <el-table-column  prop="lightIntensity1" label="0°">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity1 > 0">{{scope.row.lightIntensity1}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column sortable prop="lightIntensity8" label="上60°" width="110">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity8 > 0">{{scope.row.lightIntensity8}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column  sortable prop="lightIntensity4" label="下60°" width="110">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity4 > 0">{{scope.row.lightIntensity4}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column sortable prop="lightIntensity5" label="左60°" width="110">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity5 > 0">{{scope.row.lightIntensity5}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column  sortable prop="lightIntensity2" label="右60°" width="110">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity2 > 0">{{scope.row.lightIntensity2}}cd</span>
                                        </template>
                                    </el-table-column>
                                </template>
                                <template v-else-if="currentDetailInfo.contestTypeId==736">
                                    <el-table-column  prop="lightIntensity6" label="上30°">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity6 > 0">{{scope.row.lightIntensity6}}cd</span>
                                        <span v-if="scope.row.lightIntensity6Max >0"> ~ {{scope.row.lightIntensity6Max}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column  sortable prop="lightIntensity3" label="下45°" width="110">
                                        <template slot-scope="scope" >
                                            <span v-if="scope.row.lightIntensity3 > 0">{{scope.row.lightIntensity3}}cd</span>
                                        <span v-if="scope.row.lightIntensity3Max >0"> ~ {{scope.row.lightIntensity3Max}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column  sortable prop="lightIntensity7" label="下10°" width="110">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity7 > 0">{{scope.row.lightIntensity7}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column  sortable prop="lightIntensity9" label="下10° 左60°" width="130">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity9 > 0">{{scope.row.lightIntensity9}}cd</span>
                                        </template>
                                    </el-table-column>
                                    <el-table-column sortable prop="lightIntensity10" label="下10° 右60°" width="130">
                                        <template slot-scope="scope" >
                                        <span v-if="scope.row.lightIntensity10 > 0">{{scope.row.lightIntensity10}}cd</span>
                                        </template>
                                    </el-table-column>
                                </template>
                        </template>
                        <template v-else>
                            <el-table-column prop="lightnessAveStr" label="平均亮度">
                                <template slot-scope="scope">
                                    <span v-show="scope.row.lightnessAveStr != null">{{ scope.row.lightnessAveStr }}cd/㎡</span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="lightness" label="最小亮度">
                                <template slot-scope="scope">
                                    <span v-show="scope.row.lightness != null">{{ scope.row.lightness }}cd/㎡</span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="lightnessMax" label="最大亮度">
                                <template slot-scope="scope">
                                    <span v-show="scope.row.lightnessMax != null">{{ scope.row.lightnessMax }}cd/㎡</span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="evenness" label="亮度均匀度"></el-table-column>
                        </template>
                    <el-table-column prop="dataType" label="检测类型">
                        <template slot-scope="scope">
                            <span class="">{{ scope.row.dataType != '' ? (scope.row.dataType == 1 ?"典型检测":"项目检测") : "" }}</span>
                        </template>
                    </el-table-column>
                </el-table>
                <div style="padding:10px;text-align:center">
                    <el-pagination
                        @size-change="handleSizeChangeInner"
                        @current-change="handleCurrentChangeInner"
                        :current-page="innerRequest.page"
                        :page-sizes="[20, 50, 100, 200]"
                        :page-size="innerRequest.rows"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="InnerTotalCount">
                    </el-pagination>
                </div>
            </div>
                </div>
            </div>
        </div>
     </div>

</template>
<script>
import backHeader from '@/views/common/backHeader.vue'
import echatPointOther from '@/views/administer/analyze/echat_point_other.vue'
import echatFourOther from '@/views/administer/analyze/echat_four_other.vue'
import echatPointYsd736 from '@/views/administer/analyze/echatPointYsd736.vue'
import echatPointBkg465 from '@/views/administer/analyze/echatPointBkg465.vue'
import echatPointKg359 from '@/views/administer/analyze/echatPointKg359.vue'
import echatFourYsd736 from '@/views/administer/analyze/echatFourYsd736.vue'
import echatFourKg359 from '@/views/administer/analyze/echatFourKg359.vue'
import echatFourBkg465 from '@/views/administer/analyze/echatFourBkg465.vue'

export default {
    data(){
        return{
            tableHeight:200,
            tableHeight1:200,
            loading:false,
            currentTab:1,
            typeList:[],
            timer:1,
            request:{
                contestTypeId:'',
                h:'',
                w:'',
                w1:'',
                w2:'',
                page:1,
                rows:20,
                lumSizeMin:'',
                lumSizeMax:'',
                dataType:''
            },
            currentTypeId:'',
            tableData:[],
            totalCount:0,
            currentDetailInfo:{},
            chooseBrandIdList:[],
            innerRequest:{
                brandIds:'',
                surfaceType:'',
                page:1,
                rows:20,
                dataTypeStr:''
            },
            colorFlag:'',
            contestId:'',
            lampBrandList:[],
            InnerDataTable:[],
            InnerTotalCount:0,
            multipleSelection:[]
        }
    },
    methods:{
        checkSelectable(row){
            return row.id != null
        },
        initData(){
            this.currentTab = 1
            //加载分类信息
            let self = this
            this.$http.get("/api/dictTypeAllList", {indexPinyin:'yingyongchangjingleixing'}, function(res) {
                if (res.success) {
                    self.typeList = res.data;
                    self.search(1)
                }
            });

            this.loadBrand()
        },
        search(page){
            this.loading = true
            let self = this
            this.currentTypeId = this.request.contestTypeId
            this.request.page = page
            this.$http.postObj('/api/contestStatistics/contestTotalJson',this.request,function(res){
                if(res.success){
                    
                    self.tableData = res.data.rows
                    self.totalCount = res.data.total
                }
                self.loading = false
            })
        },
        handleCurrentChange(page) {
            this.search(page)
        },
        handleSizeChange(pageSize){
            this.request.rows = pageSize
            this.search(1)
        },
        handleCurrentChangeInner(page) {
            this.searchInner(page)
        },
        handleSizeChangeInner(pageSize){
            this.innerRequest.rows = pageSize
            this.searchInner(1)
        },
        handleShowDetail(row,colorFlag){
            this.currentDetailInfo = row
            this.contestId = row.id
            this.colorFlag=colorFlag

            this.searchInner(1)
            this.currentTab = 2
        },
        searchInner(page){
            let self = this
            var temp = ''
            for(var i = 0;i<this.chooseBrandIdList.length;i++){
                temp += this.chooseBrandIdList[i] + ","
            }
            this.innerRequest.brandIds = temp.substring(0,temp.length-1)
            this.innerRequest.page = page
            this.$http.postObj('/api/contestStatistics/pageJson/'+this.contestId+'/'+this.colorFlag,this.innerRequest,function(res){
                if(res.success){
                    var tempList = []
                    var temp = res.data.rows
                    for(var i = 0;i<temp.length;i++){
                        if(temp[i].id != null){
                            tempList.push(temp[i])
                        }
                    }
                    self.InnerDataTable = tempList
                    self.InnerTotalCount = res.data.total
                }
            })
        },
        loadBrand(){
            let self = this
            this.$http.postQuery('/api/brands/json',{isOrgState: true},function(res){
                if(res.success){
                    self.lampBrandList = res.data;
                }
            })
        },
        backList(){
            this.currentTab = 1
        },
        handleSelectionChange(val) {
            this.multipleSelection = val;
        },
        showEchat1(){
            if(this.multipleSelection.length == 0){
                this.$message.error('请选择要查看的数据！')
                return false
            }
            this.currentTab = 3
            var ids = ''
            for(var i = 0;i<this.multipleSelection.length;i++){
                ids += this.multipleSelection[i].id + ","
            }
            ids = ids.substring(0,ids.length-1)
            this.contestDetetionIds = ids
            // this.timer = new Date().getTime()
            if(this.currentDetailInfo.contestTypeId == 736){
                this.$refs.echat_point_ysd.setContestDetetionIds(ids,this.currentDetailInfo)
                this.$refs.echat_point_ysd.clearSearchParam()
                this.$refs.echat_point_ysd.initData()
            }else if(this.currentDetailInfo.contestTypeId == 465){
                this.$refs.echat_point_bkg.setContestDetetionIds(ids,this.currentDetailInfo)
                this.$refs.echat_point_bkg.clearSearchParam()
                this.$refs.echat_point_bkg.initData()
            }else if(this.currentDetailInfo.contestTypeId == 359){
                this.$refs.echat_point_kg.setContestDetetionIds(ids,this.currentDetailInfo)
                this.$refs.echat_point_kg.clearSearchParam()
                this.$refs.echat_point_kg.initData()
            }
            else{
                this.$refs.echat_point_other.setContestDetetionIds(ids,this.currentDetailInfo)
                this.$refs.echat_point_other.clearSearchParam()
                this.$refs.echat_point_other.initData()
            }
        },
        showEchat2(){
            if(this.multipleSelection.length == 0){
                this.$message.error('请选择要查看的数据！')
                return false
            }
            this.currentTab = 4
            var ids = ''
            for(var i = 0;i<this.multipleSelection.length;i++){
                ids += this.multipleSelection[i].id + ","
            }
            ids = ids.substring(0,ids.length-1)
            this.contestDetetionIds = ids
            
            this.timer = new Date().getTime()
            if(this.currentDetailInfo.contestTypeId == 736){
                this.$refs.echat_four_ysd.clearSearchParam(ids,this.currentDetailInfo)
                this.$refs.echat_four_ysd.clearSearchParam()
                this.$refs.echat_four_ysd.initData()
            }else if(this.currentDetailInfo.contestTypeId == 465){
                this.$refs.echat_four_bkg.clearSearchParam(ids,this.currentDetailInfo)
                this.$refs.echat_four_bkg.clearSearchParam()
                this.$refs.echat_four_bkg.initData()
            }else if(this.currentDetailInfo.contestTypeId == 359){
                this.$refs.echat_four_kg.clearSearchParam(ids,this.currentDetailInfo)
                this.$refs.echat_four_kg.clearSearchParam()
                this.$refs.echat_four_kg.initData()
            }else{
                this.$refs.echat_four_other.setContestDetetionIds(ids,this.currentDetailInfo)
                this.$refs.echat_four_other.clearSearchParam()
                this.$refs.echat_four_other.initData()
            }
        },
        backDetail(){
            this.currentTab = 2
        },
    },
    created(){
        console.log("dianji")
        this.initData();
    },
    components: {
        backHeader,
        echatPointOther,
        echatFourOther,
        echatPointYsd736,
        echatPointBkg465,
        echatPointKg359,
        echatFourYsd736,
        echatFourBkg465,
        echatFourKg359
    },
    mounted(){
        this.$nextTick(function () {
            this.tableHeight = window.innerHeight - 280;
            
            // 监听窗口大小变化
            let self = this;
            window.onresize = function() {
                self.tableHeight = window.innerHeight - 280
            }
            this.tableHeight1 = window.innerHeight - 320;
            
            // 监听窗口大小变化
            let self1 = this;
            window.onresize = function() {
                self1.tableHeight1 = window.innerHeight - 320
            }
        })
  }
}
</script>
<style rel="stylesheet/scss" lang="scss">
.wid150{
    .el-form-item__content{
        width: 150px;
    }
}
.administerCont .html_pst{
    position: relative;
    .top{display: inline-block}
}
.backuy{
    width: 28px;
    height: 28px;
    text-align: center;
    line-height: 28px;
    border-radius: 50%;
    border: 1px solid #000;
    display: inline-block;
    position: relative;
    top: 1px;
    margin-right: 10px;
    cursor: pointer;
}
.cassBack {
    &.active{
        display:block;
    }
}
.cassBack_two  {
    display: block;
    &.active{
        display:none;
    }
    .power{
         .el-input{
             width: 80px;
         }
    }
    .el-button--primary{
         background-color: #5b65a1;
            border-radius: 4px;
            border: none;
    }
    .top{
        margin-bottom: 20px;
        button{
            background-color: #5b65a1;
            border-radius: 4px;
            color: #fff;
            padding: 10px 20px;
            font-size: 14px;
            border: none;
            margin-right: 20px;
            cursor: pointer;
        }
    }
    .bg{
        color:  #004ff0;
    }
}
    .application{
        .el-button--primary{
            background-color: #5b65a1;
            border-radius: 4px;
            border: none;
        }
    }
    .applicationTable{
         .el-table .cell .bg{
               color:  #004ff0;
               text-decoration: underline;
               cursor: pointer;
            }
    }
.cassBack_three  {
    display: block;
   
}
.tabge tr td:last-child,.tabge tr th:last-child{
        border-right: 2px solid #d3dde2;
}
</style>